package com.sq.futurallampsdkdemo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.jack.serialport.SerialPortHelper;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void red(View view) {
        SerialPortHelper.getInstance().sendTxt(Constants.RED);
    }

    public void green(View view) {
        SerialPortHelper.getInstance().sendTxt(Constants.GREEN);
    }

    public void blue(View view) {
        SerialPortHelper.getInstance().sendTxt(Constants.BLUE);
    }

    public void grrenBlink(View view) {
        SerialPortHelper.getInstance().sendTxt(Constants.RED);
    }

    public void sevenLamp(View view) {
        SerialPortHelper.getInstance().sendTxt(Constants.SEVEN_OPEN);
    }

    public void sevenMarquee(View view) {
        SerialPortHelper.getInstance().sendTxt(Constants.SEVEN_MARQUEE);
    }

    public void blueMarquee(View view) {
        SerialPortHelper.getInstance().sendTxt(Constants.BLUE_MARQUEE);
    }

    public void exit(View view) {
        finish();
    }
}